﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Inspire.Entities
{
    public partial class Circulation : IDataErrorInfo
    {
        private Dictionary<string, string> _errors = new Dictionary<string, string>();

        /// <summary>
        /// General Error message regarding this object.
        /// 
        /// This is part of the IDataErrorInfo implementation.
        /// </summary>
        public string Error
        {
            get
            {
                return String.Empty;
            }
        }

        /// <summary>
        /// Indexer for properties of this object.
        /// 
        /// This is part of the IDataErrorInfo implementation.
        /// </summary>
        /// <param name="columnName">(string) The property to check for errors.</param>
        /// <returns>(string) If an there is an message with the specified property, the message message for that message.</returns>
        public string this[string columnName]
        {
            get
            {
                if (_errors.ContainsKey(columnName))
                {
                    return _errors[columnName];
                }
                return String.Empty;
            }
        }
        
        // TODO: Add event handlers for properties
    }
}
